export default class extends think.Model {
  get pk() {
    return "member_wechat_id";
  }
  getList() {
    return this.field("name").select();
  }
  async addWechatUser(chatinfo: UserWechatFace) {
    const result = await this.transaction(async () => {
      const create_time = think.formatter();
      const insertId = await this.add(chatinfo);
      const $MemberModel = this.model("member").db(this.db());
      let result = await $MemberModel.add({
        member_id: insertId,
        ...chatinfo,
      });
      return result;
    });
  }
  wechat(userinfo: UserWechatFace) {
    const { unionid, openid } = userinfo;
  }
}
